<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="stylesheet" type="text/css" href="__CSS__/main.css" />
    <link rel="stylesheet" type="text/css" href="__CSS__/common.css" />
    <link rel="stylesheet" type="text/css" href="__CSS__/bootstrap.min.css" />
    <script type="text/javascript" src="__EXTEND__/lib/jquery/1.9.1/jquery.min.js"></script>
    <script type="text/javascript" src="__EXTEND__/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="__EXTEND__/lib/layer/2.4/layer.js"></script>
    <![endif]-->
    <title>还款管理</title>
</head>
<body>
<div class="contant">
<div class="row">
        <!--<div class="top">抵押部>还款管理</div>-->
        <div class="content applylist">
            <div class="box">
                <h1>还款管理</h1>
                <div class="list-block">
                    <form action='{:U("Bank/Repay_index")}' method="get">
                      <div class="row">
                       <label>用户名称:</label> <input type="text" name="user_name" placeholder="请输入名称" value={$_GET['user_name']} >
                    <!--    <label>手机号:</label> <input type="text" name="telephone" placeholder="请输入手机号" value={$_GET['telephone']} > -->
                        <label>投诉时间:</label> <input type="date" name="create_time_beg" placeholder="请选择时间" value={$_GET['create_time_beg']}><em>~</em>
                        <input type="date" name="create_time_end" placeholder="请选择时间" value={$_GET['create_time_end']}>
                        <button class="search" type='submit'><img src="__IMG__/search.png" alt="">查询</button>
                     </div>
                    </form>
                    <div class="row">
                        <table class="list">
                         <thead>
                            <tr>
                             <th class="row-selected row-selected"><input type="checkbox" id="selectall" value="1" /></th>
                                <th>编号</th> <th>姓名</th> <th>身份证号</th> <th>银行</th> <th>卡号</th> <th>状态</th>
                                <th>导入时间</th><th>操作</th>
                            </tr>
                            </thead>
                            <tbody class="tbody thmb">
                            <volist name='list' id='list'>
                                 <tr> 
                                 <td><span class="ckbox"><input class="ids" type="checkbox" name="id[]" value="{$list.id}"/></span></td>
                                    <td>{$i}</td>
                                    <td>{$list.user_name}</td>
                                    <td>{$list.identity_no}</td>
                                    <td>{$list.bank_name}</td>
                                    <td>{$list.bank_card}</td>
                                    <td>已完成</td>
                                    <td>{$list.add_time|date='Y-m-d H:i',###}</td>
                                    <td>
                                     <switch name='list.status'>
                                        <case value='0'><a href="{:U('Bank/set_status', array('id' => $list['id'],'status'=>1))}">未寄送</a></case>
                                        <case value='1'>录入快递</case>
                                     </switch>
                                    </td>               
                             </tr>
                            </volist>
                           </tbody>
                        </table>
                         <div class="clearfix"> 
                            <button class="actBtn btn btn-default btn_50"" data-id='{$list.id}' data-toggle="modal" data-act='1' data-target='#myModal' type="button">寄出</button>                           
                        </div>
                    </div>
                    {$page}
                </div>
            </div>
        </div>
    </div>
                <!-- 模态框 start -->
<div id="myModal" class="modal fade in" style="display: none;">
    <div class="modal-dialog modal-lg" style='width:720px;'>
        <!--  -->
            <div class="modal-content" style="padding-bottom:0px;">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal">&times;</button>
                    <h4 class="modal-title">数据加载中……</h4>
                </div>
                <div class="modal-body" style='height:400px;overflow-y:auto;'>数据加载中……</div>
                <div class="modal-footer" style="margin-top:0px;">
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                </div>
            </div>
        </div>
</div>
    <!-- 模态框 end -->
     <div class="express hide">
                <h1>快递录入<span>(标*为必填项)</span></h1>
                <div class="list-block">
                    <div class="row">
                        <label>寄件人:</label>
                        <input type="text" name="send_name" value=''>
                        <label>收件人:</label>
                        <input type="text" name="addressee" value=''>
                    </div>
                    <div class="row">
                        <label>快递单号:</label>
                        <input type="text" name="express_number" value=''>
                    </div>
                    <div class="row">
                        <label>快递内容:</label>
                       <textarea name="express_content" rows='6'> </textarea>
                        
                    </div>
                    <div class="row">
                        <label>快递时间:</label>
                        <input type="date" name="express_times" placeholder="请选择时间" value="{:date('Y-m-d')}" />
                        <label>快递公司:</label>
                        <select name="company_id" id="form-field-10">
                            <foreach name="express_company" item="v" >
                             <if condition="$key eq $info['company_id']">
                            <option value={$key} selected>{$v}</option>
                             <else />
                             <option value={$key}>{$v}</option>
                            </if>
                            </foreach>
                        </select>
                    </div>
                    <input name='act' value='1' type='hidden'/>
          </div>
     </div>
    <script type="text/javascript">
          $('#selectall').click(function(){
                if($(this).is(':checked')) {
                    $('.thmb').each(function(){
                        $(this).find('input').attr('checked',true);
                    });
                } else {
                    $('.thmb').each(function(){
                        $(this).find('input').attr('checked',false);
                    });
                }
            });
            $('.ckbox').click(function(){$('#selectall').attr('checked',false);});
            $('.actBtn').click(function(){
                var act = $(this).data('act'), id = $(this).data('id'), html = '', title = '', ids = '0';;
                $.each($('.ids:checked'), function(i, v){ids += ',' + $(v).val();});
                   if(ids == '0'){
                        alert('请勾选需要操作的会员！');
                    }else{
                            html += '<div class="com_form"><form action="{:U("Archives/add_express")}" method="post" id="baseForm" class="wid_100"><div class="basics"><input type="hidden" name="ids" value="'+ids+'" />';
                            if(act == 1){
                                title = '寄出快递';
                                html += $('.express').html();
                            }
                          html += '<div class="group clearfix"><label class="title wid_30 fl"></label><div class="fill wid_70 fl"><button type="submit" class="btn btn_yellow btn_100">保存</button></div></div></div></form></div>';
                          $('.modal-body').html(html);  
                    }
               $('.modal-title').html(title);    
            });
    </script>